{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="form1" action="" method="post">
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; margin-top:2px; color:#3c8dbc;" ></span>
                    <p class="box-title">奖励性绩效工资表</p>
                </div>
                <div class="box-body">
                      <h3 class="text-center">{%$semester_data.semester_name%}（第{%$pay_month%}学月）学校教职工奖励性绩效工作分配统计表</h3>
                      <table class="table table-bordered">   
                             <tr>
                                <td rowspan="2">编号</td>
                                <td rowspan="2">姓名</td>
                                <td rowspan="2">班主任补贴</td>
                                <td rowspan="2">职务补贴</td>
                                <td colspan="2">出勤补贴</td>
                                <td colspan="4" align="center">工作量补贴</td>
                                <td rowspan="2">其他</td>
                                <td colspan="6" align="center">应扣</td>
							 </tr>
                             <tr>
                                <td>全勤</td>
                                <td>值日</td>
                                <td>作业</td>
                                <td>课时</td>
                                <td>超课时</td>
                                <td>代课</td>
                                <td>节数</td>
                                <td>金额</td>
                                <td>会旗</td>
                                <td>金额</td>
                                <td>其它</td>
							 </tr>
							 {%foreach from=$out_lists key=key item=value%}
                             <tr>
                                <td>{%$value.lists.staff_number%}</td>
                                <td>{%$value.lists.staff_name%}</td>
                                <td><input name="class_{%$value.staff_id%}" value="{%$value.lists.class%}" type="text" style="width:100%"></td>
                                <td><input name="job_{%$value.staff_id%}" value="{%$value.lists.job%}"  type="text" style="width:100%"></td>
                                <td><input name="check_{%$value.staff_id%}" value="{%$value.lists.check%}"  type="text" style="width:100%"></td>
                                <td><input name="duty_{%$value.staff_id%}" value="{%$value.lists.duty%}"  type="text" style="width:100%"></td>
                                <td><input name="home_{%$value.staff_id%}" value="{%$value.lists.home%}"  type="text" style="width:100%"></td>
                                <td><input name="hour_{%$value.staff_id%}" value="{%$value.lists.hour%}"  type="text" style="width:100%"></td>
                                <td><input name="uphour_{%$value.staff_id%}" value="{%$value.lists.uphour%}"  type="text" style="width:100%"></td>
                                <td><input name="adjust_{%$value.staff_id%}" value="{%$value.lists.adjust%}"  type="text" style="width:100%"></td>
                                <td><input name="other_{%$value.staff_id%}" value="{%$value.lists.other%}"  id="jia{%$key%}" class="jia" style="width:50%" /> <span class="niu" onclick="ab({%$key%}, 'jia')">+</span> </td>
                                <td><input name="costa_{%$value.staff_id%}" value="{%$value.lists.costa%}"  type="text" style="width:100%"></td>
                                <td><input name="costb_{%$value.staff_id%}" value="{%$value.lists.costb%}"  type="text" style="width:100%"></td>
                                <td><input name="costc_{%$value.staff_id%}" value="{%$value.lists.costc%}"  type="text" style="width:100%"></td>
                                <td><input name="costd_{%$value.staff_id%}" value="{%$value.lists.costd%}"  type="text" style="width:100%"></td>
                                <td><input name="coste_{%$value.staff_id%}" value="{%$value.lists.coste%}"  type="text"  style="width:100%"></td>
							 </tr>
							 {%/foreach%}

						 </table>      	   
				    </div><!--box-body --> 
                    <div class="box-footer text-center">
                        <button type="submit" class="btn btn-primary"> 确 定</button>   	   
                    </div>
                 </form>
             </div><!--box box-default box-solid-->
          </section>   
        </div><!--row-->
    </section>
 </div>
 {%include file="index.footer.tpl.php"%}
<script>
function ab(id, c){
	var s = 0;
    var d = $("." + c);
	var g = "#" + c;
	// 遍历
	$.each(d, function (k, v){		

		if( $(this).val() == "" ){
			var i = k+1;
			// 一个不为空
			if($(g+k).val() != ""){
				s = $(g+k).val();
			}
			if(i <= id){
				$(g+i).val(s);
			}		
		}
  });
};

</script>


